home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1985 April / Ahoy_Magazine_85-04_1985_Double_L.d64 / space hunt (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1985-01-01  |  8.2 KB  |  260 lines

  1. 10 rem anthony wood
  2. 20 rem 12739 grand cross ln.
  3. 30 rem houston, tx 77072
  4. 100 rem 6/18/84
  5. 110 printchr$(142);"[147]      [213][195][195][213][195][201][213][195][201][213][195][201][176][192]  [178] [178][176] [174][213][201][178][176][178][174]"
  6. 120 print"      [202][195][201][171][195][203][171][195][179][194]  [171][195]  [171][195][179][194] [194][194][194][194] [194] "
  7. 130 print"      [195][195][203][177]  [177] [177][202][195][203][173][195]  [177] [177][202][195][203][177][202][189] [177] "
  8. 140 print"         (c) copyright 1984"
  9. 150 print"            anthony wood"
  10. 160 dimd$(13),n(13),s(13),e(13),w(13),i(13,10),in(10),n$(20),t(12):nc=0
  11. 170 er$="[201] don't see one here!":un$="[201] don't understand."
  12. 180 cg$="[201] can't get that!"
  13. 190 forx=0to13:readd$(x),n(x),s(x),e(x),w(x),k:ifk=0then 210
  14. 200 fory=0tok-1:reada$:gosub 2240:i(x,y)=nc:next
  15. 210 next
  16. 220 l=0:i(9,0)=7
  17. 230 print"press return to start.";
  18. 240 geta$:ifa$<>chr$(13)then 240
  19. 250 print"[147]";chr$(14);
  20. 260 print"[147][201] am ";d$(l):print
  21. 270 ifn(l)+s(l)+e(l)+w(l)=-4then 340
  22. 280 print"exits: ";
  23. 290 ifn(l)<>-1thenprint"north. ";
  24. 300 ifs(l)<>-1thenprint"south. ";
  25. 310 ife(l)<>-1thenprint"east. ";
  26. 320 ifw(l)<>-1thenprint"west.";
  27. 330 print
  28. 340 s=0:forx=0to10:s=s+i(l,x):next:ifs=0then 380
  29. 350 print:print"[201] can see:"
  30. 360 forx=0to10:ifi(l,x)<>.thenprintn$(i(l,x));". ";
  31. 370 next:print
  32. 380 print"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
  33. 390 print"[215]hat now? ";:gosub 2020
  34. 400 ifi$=""then 390
  35. 410 ifi$="[147]"then 260
  36. 420 ifv$<>"i"andleft$(v$,3)<>"inv"then 460
  37. 430 s=0:forx=0to10:s=s+in(x):next:ifs=0thenprint"[201]'m not carrying anything.":goto 390
  38. 440 forx=0to10:ifin(x)=0thennext:goto 390
  39. 450 printn$(in(x)):next:goto 390
  40. 460 ifv$="n"ori$="north"thenex=n(l):goto 510
  41. 470 ifv$="s"ori$="south"thenex=s(l):goto 510
  42. 480 ifv$="e"ori$="east"thenex=e(l):goto 510
  43. 490 ifv$<>"w"andi$<>"west"then 530
  44. 500 ex=w(l)
  45. 510 ifex=-1thenprint"[201] can't go that way!":goto 390
  46. 520 l=ex:ld=0:goto 260
  47. 530 l$=left$(n$,3):ifl$="tra"thenl$="pil":goto 650
  48. 540 ifl$="loc"thenl$="equ":goto 650
  49. 550 ifl$="tru"thenl$="woo":goto 650
  50. 560 ifl$="sui"thenl$="pre":goto 650
  51. 570 ifl$="shi"thenl$="spa":goto 650
  52. 580 ifl$="but"thenl$="red":goto 650
  53. 590 ifl$="equ"thenl$="lot":goto 650
  54. 600 ifl$="boa"thenl$="con":goto 650
  55. 610 ifl$="tre"thenl$="fab":goto 650
  56. 620 ifl$="bou"thenl$="lar":goto 650
  57. 630 ifl$="sta"thenl$="air":goto 650
  58. 640 ifl$="doo"and(l=9orl=7)thenl$="spa"
  59. 650 v$=left$(v$,3):ifl$="321"orl$="dow"thennn=99:goto 710
  60. 660 ifv$="lay"orv$="lie"orv$="sav"orv$="loa"then 710
  61. 670 ifv$="loo"then 260
  62. 680 ifv$="qui"thenprint"[147]type 'goto 250' to recover.":end
  63. 690 fornn=1tonc:ifl$=left$(n$(nn),3)then 710
  64. 700 next:printun$:goto 390
  65. 710 ifv$<>"exa"andv$<>"sea"then 910
  66. 720 gosub 2190:iff=0thenprint"[201] don't see a ";n$;" here!":goto 390
  67. 730 ifl$="equ"thenprint"[201]t's a metal storage locker.":goto 390
  68. 740 ifl$="lar"thenprint"[212]here seems to be something under here.":goto 390
  69. 750 ifl$="con"thenprint"[201] see a calculator type keyboard here.":goto 390
  70. 760 ifl$<>"pre"then 800
  71. 770 ifcc=1then 900
  72. 780 cc=1:print"[201] found a screw driver here!":a$="screw driver":gosub 2240
  73. 790 gosub 2270:goto 390
  74. 800 ifl$="spa"thenprint"[201] can see a door.":goto 390
  75. 810 ifl$<>"woo"then 840
  76. 820 print"[201]t's a wooden trunk.":iflk=0thenprint"[201]t's locked."
  77. 830 goto 390
  78. 840 ifl$<>"pil"then 860
  79. 850 ifkf=0thenprint"[201] find a key here!":a$="key":gosub 2240:gosub 2270:kf=1:goto 390
  80. 860 ifl$<>"lot"then 900
  81. 870 ifpp=1then 900
  82. 880 print"[212]here is an access pannel screwed down  here.":a$="pannel":gosub 2240
  83. 890 gosub 2270:pp=1:goto 390
  84. 900 print"[201] see nothing special.":goto 390
  85. 910 ifv$<>"ope"then 1040
  86. 920 gosub 2190:iff=0thenprinter$:goto 390
  87. 930 ifl$<>"equ"then 990
  88. 940 ifws<>0then 970
  89. 950 print"[193][199][199][200][200]!! [201]'m electrocuted by 10,000":print"volts that was wired to the locker."
  90. 960 end
  91. 970 ifnt=1thenprint"[201]t's empty":goto 390
  92. 980 nt=1:print"[201] find a note here!":a$="note":gosub 2240:gosub 2270:goto 390
  93. 990 ifl$<>"woo"thenprintun$:goto 390
  94. 1000 iflk=0thenprint"[201]t's locked!":goto 390
  95. 1010 ifte=1thenprint"[201]t's empty.":goto 390
  96. 1020 te=1:print"[201] found a pressure suit in here!":a$="pressure suit":gosub 2240
  97. 1030 gosub 2270:goto 390
  98. 1040 ifv$<>"unl"then 1090
  99. 1050 gosub 2190:iff=0thenprinter$:goto 390
  100. 1060 ifl$<>"woo"thenprintun$:goto 390
  101. 1070 a$="key":gosub 2430:gosub 2190:iff=0thenprint"[201] need a key.":goto 390
  102. 1080 lk=1:print"ok":goto 390
  103. 1090 ifv$<>"wea"then 1140
  104. 1100 gosub 2190:iff=0thenprinter$:goto 390
  105. 1110 ifl$<>"pre"thenprintun$:goto 390
  106. 1120 iff=1thengosub 2310:gosub 2350
  107. 1130 print"ok":ws=1:goto 390
  108. 1140 ifv$<>"rea"then 1180
  109. 1150 gosub 2190:iff=0thenprinter$:goto 390
  110. 1160 ifl$<>"not"thenprintun$:goto 390
  111. 1170 print"[201]t says '3212'":goto 390
  112. 1180 ifv$<>"pre"andv$<>"pus"then 1240
  113. 1190 gosub 2190:iff=0thenprinter$:goto 390
  114. 1200 ifl$<>"red"thenprintun$:goto 390
  115. 1210 ifws=0thenprint"[193][199][199][200][200]!!! [212]he airlock cycles out. [201]'m    dead!":end
  116. 1220 ifw(l)=0thenw(l)=-1:e(l)=7:goto 260
  117. 1230 w(l)=0:e(l)=-1:goto 260
  118. 1240 ifv$<>"go"andv$<>"ent"then 1300
  119. 1245 ifl$="321"then 1430
  120. 1250 gosub 2190:iff=0thenprinter$:goto 390
  121. 1260 ifl$="air"thenl=4:goto 260
  122. 1270 ifl$="spa"thenl=6:goto 260
  123. 1280 ifl$="tun"thenl=12:goto 260
  124. 1290 printun$:goto 390
  125. 1300 ifv$<>"get"andv$<>"tak"andv$<>"pic"then 1370
  126. 1310 gosub 2190:iff=0thenprinter$:goto 390
  127. 1320 iff=2thenprint"[201]'m already carrying it!":goto 390
  128. 1330 ifl$="equ"orl$="pil"orl$="lot"orl$="tun"orl$="con"thenprintcg$:goto 390
  129. 1340 ifl$="spa"orl$="lar"orl$="air"thenprintcg$:goto 390
  130. 1350 ifl$="fab"thenprint"** [195]ongratulations **   [217]ou have found  the treasure!":end
  131. 1360 gosub 2350:gosub 2310:print"ok":goto 390
  132. 1370 ifv$<>"dro"andv$<>"put"then 1420
  133. 1380 gosub 2190:iff<>2thenprinter$:goto 390
  134. 1390 ifl$="pre"andl>6thenprint"[193][213][199][199][200][200]!! [201]'m spaced!":end
  135. 1400 ifl$="pre"thenws=0
  136. 1410 gosub 2390:gosub 2270:print"ok":goto 390
  137. 1420 ifv$<>"typ"then 1470
  138. 1430 ifl<>6thenprint"[201] can't do that here!":goto 390
  139. 1440 ifl$<>"321"thenprint"[206]othing happens.":goto 390
  140. 1450 ifs(l)=9thenprint"[206]othing happens.":goto 390
  141. 1460 s(l)=9:print"[212]he ship takes off, and we soon land    elsewhere.":goto 390
  142. 1470 ifv$<>"uns"then 1540
  143. 1480 ifl<>5thenprint"[201] can't do that here!":goto 390
  144. 1490 a$="screw driver":gosub 2430:gosub 2190:iff<>0then 1510
  145. 1500 print"[201] need a screw driver!":goto 390
  146. 1510 ifpa=1thenprint"[201]t's already unscrewed.":goto 390
  147. 1520 pa=1:print"ok":print"[201] found a blaster here!":a$="blaster":gosub 2240
  148. 1530 gosub 2270:goto 390
  149. 1540 ifv$<>"bla"andv$<>"sho"then 1610
  150. 1550 gosub 2190:iff=0thenprinter$:goto 390
  151. 1555 z=nn:a$="blaster":gosub2430:gosub2190:iff=0thenprint"[201] need a ";a$:goto 390
  152. 1560 ifl$="bla"thenprint"at what?":goto 390
  153. 1570 ifl$<>"lar"thenprint"[201] can't shoot that!":goto 390
  154. 1580 ifld=0thenprint"[193][199][199][200][200]! [211]tanding up like this, i'm hit   hit by rocks!":end
  155. 1590 print"[203][193][193][194][207][207][205]!!  [193] tunnel was under the       boulder!":nn=z
  156. 1600 gosub2310:a$="tunnel":gosub 2240:gosub 2270:goto 390
  157. 1610 ifv$<>"fir"then 1650
  158. 1620 gosub 2190:iff=0thenprinter$:goto 390
  159. 1630 ifl$<>"bla"thenprintun$:goto 390
  160. 1640 print"try shoot ....":goto 390
  161. 1650 ifv$<>"lay"andv$<>"lie"then 1680
  162. 1660 ifl$<>"dow"andl$<>""thenprintun$:goto 390
  163. 1670 print"ok":ld=1:goto 390
  164. 1680 ifv$<>"sav"then 1780
  165. 1690 f$=n$+".adv":open15,8,15,"i0":print#15,"s0:"+f$:open2,8,2,f$+",s,w"
  166. 1700 input#15,e,er$,z,z:ife<>0thenprinter$:close2:close15:goto 390
  167. 1710 print#2,nc:forx=1tonc:print#2,n$(x):next:forx=0to13:fory=0to10
  168. 1720 print#2,chr$(i(x,y));:next:next
  169. 1730 forx=0to10:print#2,chr$(in(x));:next:print#2,chr$(l);chr$(cc);chr$(pp);
  170. 1740 print#2,chr$(nt);chr$(te);chr$(lk);chr$(ws);chr$(pa);chr$(ld);chr$(kf);
  171. 1750 ifw(4)=-1thenprint#2,chr$(1);:goto 1770
  172. 1760 print#2,chr$(0);
  173. 1770 print#2,chr$(s(6));:close2:close15:print"ok":goto 390
  174. 1780 ifv$<>"loa"then 1890
  175. 1790 f$=n$+".adv":open15,8,15,"i0":open2,8,2,f$+",s,r":input#15,e,er$,z,z
  176. 1800 ife<>0thenprinter$:close2:close15:goto 390
  177. 1810 input#2,nc:forx=1tonc:input#2,n$(x):next:forx=0to13:fory=0to10
  178. 1820 get#2,a$:i(x,y)=asc(a$+chr$(0)):next:next:forx=0to10:get#2,a$
  179. 1830 in(x)=asc(a$+chr$(0)):next:forx=0to11:get#2,a$:t(x)=asc(a$+chr$(0)):next
  180. 1840 l=t(0)
  181. 1850 cc=t(1):pp=t(2):nt=t(3):te=t(4):lk=t(5):ws=t(6):pa=t(7):ld=t(8):kf=t(9)
  182. 1860 s(6)=t(11):ift(10)=0thene(4)=-1:w(4)=0:goto 1880
  183. 1870 e(4)=7:w(4)=-1
  184. 1880 close2:close15:goto 260
  185. 1890 ifv$<>"use"then 1950
  186. 1900 gosub 2190:iff=0thenprinter$:goto 390
  187. 1910 ifl$="bla"thenprint"[212]ry shoot ...":goto 390
  188. 1920 ifl$<>"key"thenprintun$:goto 390
  189. 1930 a$="wooden trunk":gosub 2430:gosub 2190:iff<>0then 1080
  190. 1940 print"[201] can't do that here!":goto 390
  191. 1950 ifv$<>"mov"andv$<>"rol"thenprintun$:goto 390
  192. 1960 gosub 2190:iff=0thenprinter$:goto 390
  193. 1970 ifl$<>"lar"thenprint"[201]'m not making much progress.":goto 390
  194. 1980 print"[201]t's too heavy.":goto 390
  195. 1990 rem
  196. 2000 rem input routine
  197. 2010 rem
  198. 2020 i$=""
  199. 2030 print"[168]";
  200. 2040 geta$:ifa$=""then 2040
  201. 2050 ifa$="[147]"theni$=a$:return
  202. 2060 print"[157] [157]";a$;:ifa$=chr$(13)then 2090
  203. 2070 ifa$=chr$(20)andi$<>""theni$=left$(i$,len(i$)-1):goto 2030
  204. 2080 i$=i$+a$::goto 2030
  205. 2090 ifi$=""thenreturn
  206. 2100 fors=1tolen(i$):ifmid$(i$,s,1)<>" "thennext:v$=i$:n$="":return
  207. 2110 v$=left$(i$,s-1):n$=right$(i$,len(i$)-s)
  208. 2120 return
  209. 2130 rem
  210. 2140 rem search for nn
  211. 2150 rem f=0 if not found
  212. 2160 rem f=1 if in room
  213. 2170 rem f=2 if in inventory
  214. 2180 rem
  215. 2190 forx=0to10:ifi(l,x)=nnthenf=1:return
  216. 2200 ifin(x)=nnthenf=2:return
  217. 2210 next:f=0:return
  218. 2220 rem
  219. 2230 rem add a$ to noun list. nn=pos
  220. 2240 nc=nc+1:n$(nc)=a$:nn=nc:return
  221. 2250 rem
  222. 2260 rem add nn to room
  223. 2270 forx=0to10:ifi(l,x)=0theni(l,x)=nn:return
  224. 2280 next:print"error!":return
  225. 2290 rem
  226. 2300 rem delete nn from room
  227. 2310 forx=0to10:ifi(l,x)=nntheni(l,x)=0:return
  228. 2320 next:print"error!":return
  229. 2330 rem
  230. 2340 rem add nn to inventory
  231. 2350 forx=0to10:ifin(x)=0thenin(x)=nn:return
  232. 2360 next:print"error!":return
  233. 2370 rem
  234. 2380 rem delete nn from inve
  235. 2390 forx=0to10:ifin(x)=nnthenin(x)=0:return
  236. 2400 next:print"error!":return
  237. 2410 rem
  238. 2420 rem set nn to no. for a$
  239. 2430 fornn=1tonc:ifn$(nn)=a$thenreturn
  240. 2440 next:nn=99:return
  241. 2450 data "in the entrance chamber of a lunarspace station.",-1,1,4,-1,1
  242. 2460 data "equipment locker"
  243. 2470 data "in a narrow hallway that runsnorth-south.",0,3,2,-1,0
  244. 2480 data "in a long deserted bunk room.",-1,-1,-1,1,1,"wooden trunk"
  245. 2490 data "in a rectangular room that smellsmusty and old.",1,-1,-1,-1,1
  246. 2500 data "pile of trash"
  247. 2510 data "in a space station airlock.",-1,-1,-1,0,1,"red button"
  248. 2520 data "in a space ship's engine room.",-1,-1,6,-1,1
  249. 2530 data"lots of complicated equipment"
  250. 2540 data "in a space ship control room.",-1,7,-1,5,1,"control board"
  251. 2550 data "on an open lunar plain.",-1,-1,-1,-1,2,"space ship"
  252. 2560 data "airlock to space station"
  253. 2570 data "in an asteroid crater.",-1,9,-1,11,0
  254. 2580 data "on an asteroid plain.",8,-1,-1,10,0
  255. 2590 data "on an asteroid plain.",11,-1,9,-1,1,"large boulder"
  256. 2600 data "in the hills on an asteroid.",-1,10,8,-1,0
  257. 2610 data "in a sloping tunnel.",10,13,-1,-1,0
  258. 2620 data "in the underground treasure room.",-1,-1,-1,-1,1
  259. 2630 data "fabulous treasure"
  260.